<?if(strpos($_SERVER['PHP_SELF'],"module/")>0):?>
<html><head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<script src='<?=_P("application/views/scripts/jquery-1.5.1.js")?>'></script> 
</head>
<body>
<?endif;?>
<?if(!isset($ci->baidu_map_model)):?>
<script src="<?=_P("application/modules/baidu_map/views/jquery.baidu.map.js")?>"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=46ce9d0614bf7aefe0ba562f8cf87194&v=1.1&services=true"></script>
<?$ci->baidu_map_model=true;endif;?> 
<?
$guid = guid();
?>
<script>
$(document).ready(function(){
	$('#<?=$guid?>').baidu_map({
		title:'<?=$title?>',profile:'<?=$profile?>',
		phone:'<?=$phone?>',address:'<?=$address?>',
		lat:'<?=$lat?>',lng:'<?=$lng?>' 
	});
}); 

</script> 
<div id="<?=$guid?>" style="width:<?=$width?>;height:<?=$height?>"></div> 
<?if(strpos($_SERVER['PHP_SELF'],"module/")>0):?>
</body></html> 
<?endif;?>